package com.shinlooker.hencoder

import android.util.Log
import com.shinlooker.hencoder.utils.Base64Util
import com.shinlooker.hencoder.utils.Sha1Util


fun main() {
    /*  println("hello kotlin")
      var a: Int = 10
      a = a * 10
      var range = 0..10*/
    /*   val seid = "123456"
       val encryptToSHA = Sha1Util.encryptToSHA(seid)
       println("Test Sha1Util-->" + encryptToSHA)
       val encode = Base64Util.encode(encryptToSHA)
       println("Test Base64Util-->" + encode)*/

    /*  val list = listOf("Banana", "Apple", "Orange", "Pear")
      var maxLengthFruit = ""
      for (fruit in list) {
          if (fruit.length > maxLengthFruit.length) {
              maxLengthFruit = fruit
          }
      }
      println("max "+maxLengthFruit)*/


    val list = listOf("Banana", "Apple", "Orange", "Pear","yiyiyiyi")
    var maxLengthFruit = list.maxByOrNull { it.length }
    println("max " + maxLengthFruit)


}
